const expect=require('chai').expect;


describe('lengthOf()',()=>{
    it('array',()=>{
        expect([1,2,3]).lengthOf(3);
    });

    it('string',()=>{
        expect('abcd').lengthOf(4);
    });

    it('obj',()=>{
        expect({length:3}).lengthOf(3);
    });

    it('myOjb',()=>{
        let Foo=function(){};
        Foo.prototype.length=2;
        let foo=new Foo();
        expect(foo).lengthOf(2);
    });
});